using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._AttributeRules
{
    /// <summary>
    /// <para>Export Attribute Rules</para>
    /// <para>Exports attribute rules from a dataset to a comma-separated values (.csv) file.</para>
    /// <para>将属性规则从数据集导出到逗号分隔值 （.csv） 文件。</para>
    /// </summary>    
    [DisplayName("Export Attribute Rules")]
    public class ExportAttributeRules : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExportAttributeRules()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para>The table or feature class from which the attribute rules will be exported.</para>
        /// <para>将从中导出属性规则的表或要素类。</para>
        /// </param>
        /// <param name="_out_csv_file">
        /// <para>Output File</para>
        /// <para>The folder location and name of the .csv file to be created.</para>
        /// <para>要创建的.csv文件的文件夹位置和名称。</para>
        /// </param>
        public ExportAttributeRules(object _in_table, object _out_csv_file)
        {
            this._in_table = _in_table;
            this._out_csv_file = _out_csv_file;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Export Attribute Rules";

        public override string CallName => "management.ExportAttributeRules";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_table, _out_csv_file];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The table or feature class from which the attribute rules will be exported.</para>
        /// <para>将从中导出属性规则的表或要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Output File</para>
        /// <para>The folder location and name of the .csv file to be created.</para>
        /// <para>要创建的.csv文件的文件夹位置和名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_csv_file { get; set; }


        public ExportAttributeRules SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}